<?php
namespace pinduoduo\Request;

use pinduoduo\AbstractInterface\Request;

class PddDdkOauthResourceUrlGenRequest extends Request
{
    /**
     * 拼多多主站频道推广接口
     * @var string
     */
    private $type = 'pdd.ddk.oauth.resource.url.gen';

    /**
     * 自定义参数，为链接打上自定义标签；自定义参数最长限制64个字节；格式为： {"uid":"11111","sid":"22222"} ，其中 uid 用户唯一标识，可自行加密后传入，每个用户仅且对应一个标识，必填； sid 上下文信息标识，例如sessionId等，非必填。该json字符串中也可以加入其他自定义的key
     * @var
     */
    private $customParameters;

    /**
     * 是否返回 schema URL
     * @var
     */
    private $generateSchemaUrl;

    /**
     * 是否生成拼多多福利券微信小程序推广信息
     * @var
     */
    private $generateWeApp;

    /**
     * 推广位
     * @var
     */
    private $pid;

    /**
     * 频道来源：4-限时秒杀,39997-充值中心, 39998-活动转链，39996-百亿补贴，39999-电器城，40000-领券中心，50005-火车票
     * @var
     */
    private $resourceType;

    /**
     * 原链接
     * @var
     */
    private $url;

    public function setType($type)
    {
        $this->type = $type;
    }

    public function getType()
    {
        return $this->type;
    }

    public function setCustomParameters($customParameters)
    {
        $this->customParameters = $customParameters;
    }

    public function getCustomParameters()
    {
        return $this->customParameters;
    }

    public function setGenerateSchemaUrl($generateSchemaUrl)
    {
        $this->generateSchemaUrl = $generateSchemaUrl;
    }

    public function getGenerateSchemaUrl()
    {
        return $this->generateSchemaUrl;
    }

    public function setGenerateWeApp($generateWeApp)
    {
        $this->generateWeApp = $generateWeApp;
    }

    public function getGenerateWeApp()
    {
        return $this->generateWeApp;
    }

    public function setPid($pid)
    {
        $this->pid = $pid;
    }

    public function getPid()
    {
        return $this->pid;
    }

    public function setResourceType($resourceType)
    {
        $this->resourceType = $resourceType;
    }

    public function getResourceType()
    {
        return $this->resourceType;
    }

    public function setUrl($url)
    {
        $this->url = $url;
    }

    public function getUrl()
    {
        return $this->url;
    }

    public function getParams()
    {
        $params = [
            'type'              => $this->type,
            'custom_parameters' => $this->customParameters,
            'generate_schema_url' => $this->generateSchemaUrl,
            'generate_we_app'   => $this->generateWeApp,
            'pid'               => $this->pid,
            'resource_type'     => $this->resourceType,
            'url'               => $this->url,
        ];
        return array_filter($params);
    }
}
